<script type="text/javascript" src="<?php echo URL::base()?>js/feedback.js"></script>
<div id="dialog-form-feedback" title="<?php echo $current_tab["display_name"];?>"></div>
<div id="supplier-contain" class="ui-widget">
<div>
	<span style="padding-left: 1px">
		类别:
		<select id="type" class="ui-widget-content ui-corner-all">
			<option value="">全部</option>
			<option value="E" <?php if (!empty($search_result_type)&& $search_result_type=="E") echo "selected"?>>信息报错</option>
			<option value="F" <?php if (!empty($search_result_type)&& $search_result_type=="F") echo "selected"?>>意见反馈</option>
		</select>
		处理类型:
		<select id="process" class="ui-widget-content ui-corner-all">
			<option value="">全部</option>
			<option value="N" <?php if (!empty($search_result_process)&& $search_result_process=="N") echo "selected"?>>未处理</option>
			<option value="Y" <?php if (!empty($search_result_process)&& $search_result_process=="Y") echo "selected"?>>已处理</option>
		</select>
	</span>
	<label for="from" style="width: 0px;"></label>
	从
	<input type="text" id="from" name="from" style="display:inline;float: none;" value="<?php if (!empty($search_result_startdate)) echo $search_result_startdate?>"/>
	<label for="to" style="width: 0px;"></label>
	至
	<input type="text" id="to" name="to" style="display:inline;float: none;" value="<?php if (!empty($search_result_enddate)) echo $search_result_enddate?>"/>
	<button id="query-feedback">查询</button>
</div>
<table id="supplier" class="ui-widget ui-widget-content">
	<thead>
		<tr class="ui-widget-header ">
			<th><input type="checkbox" onclick="changeSelectAll(this,'checkKey');"></th>
			<th>类型</th>
			<th>内容</th>
			<th>提交时间</th>
			<th>联系信息</th>
			<th>状态/操作</th>
		</tr>
	</thead>
	<tbody>
	<?php
	foreach ($result_feedback as $item){
		echo '<tr><td><input type="checkbox" class="checkKey" key="'.$item->id.'"/></td>';
		echo '<td>'.$item->displayType().'</td>';
		echo '<td>'.$item->diplaySupplier().$item->desc.'</td>';
		echo '<td>'.$item->createtime.'</td>';
		echo '<td>'.$item->contact.'</td>';
		echo '<td><span id="process-'.$item->id.'">'.$item->displayProcess().'</span>';
		if(!$item->isProcessd()){
			echo '<br/><a style="color:red" fbid="'.$item->id.'" href="javascript:void(0)" onclick="processFeedback(this)">处理完成</a>';
		}
		echo'</td>';
		echo '</tr>';
	}?>
	</tbody>
</table>
<div class="page clear"><?php echo $page_links;?></div>
<button id="delete-feedback">删除选中条目</button>
</div>
<script type="text/javascript" src="<?php echo URL::base()?>jquery/development-bundle/ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="<?php echo URL::base()?>jquery/development-bundle/ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="<?php echo URL::base()?>jquery/development-bundle/ui/jquery.ui.datepicker.js"></script>
<script>
	$(function() {
		var dates = $( "#from, #to" ).datepicker({
			defaultDate: "minDate",
			changeMonth: true,
			numberOfMonths: 3,
			dateFormat:'yy-mm-dd',
			onSelect: function( selectedDate ) {
				var option = this.id == "from" ? "minDate" : "maxDate",
					instance = $( this ).data( "datepicker" ),
					date = $.datepicker.parseDate(
						instance.settings.dateFormat ||
						$.datepicker._defaults.dateFormat,
						selectedDate, instance.settings );
				dates.not( this ).datepicker( "option", option, date );
			}
		});
	});
</script>